import { createRouter, createWebHashHistory } from "vue-router";

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
   {path :'/', redirect:'/login'},
   {path: '/login', component:() => import('./components/Login.vue')},
   {path: '/home', component:() => import('./components/Home.vue'),
    redirect:'/home/users',
children:[
{path: 'users', component:() => import('./components/subcomponents/Users.vue')},
{path: 'rights', component:() => import('./components/subcomponents/Rights.vue')},
{path: 'orders', component:() => import('./components/subcomponents/Orders.vue')},
{path: 'goods', component:() => import('./components/subcomponents/Goods.vue')},
{path: 'settings', component:() => import('./components/subcomponents/Settings.vue')},
      ]
     },
   ]
});
export default router;